#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;

const char* a[] = {"LD", "RD", "LU", "RU", "D", "U", "L", "R"};

int main()
{
	char x1, x2;
	int y1, y2;
	scanf("%c%d\n%c%d", &x1, &y1, &x2, &y2);
	x1 -= 'a' - 1;
	x2 -= 'a' - 1;
	int t1 = min(abs(x1 - x2), abs(y1 - y2));
	int t2 = abs(abs(x1-x2)-abs(y1-y2));
	int ans = t1 + t2;

	printf("%d\n", ans);
	if (x2 > x1) {
		if (y2 > y1) {
			for (int i = 0; i != t1; ++i) printf("%s\n", a[3]);
			if (x2-x1 < y2-y1)
				for (int i = 0; i != t2; ++i) printf("%s\n", a[5]);
			else
				for (int i = 0; i != t2; ++i) printf("%s\n", a[7]);
		}
		if (y2 < y1) {
			for (int i = 0; i != t1; ++i) printf("%s\n", a[1]);
			if (x2-x1 < y1-y2)
				for (int i = 0; i != t2; ++i) printf("%s\n", a[4]);
			else
				for (int i = 0; i != t2; ++i) printf("%s\n", a[7]);
		}
		if (y2 == y1)
			for (int i = 0; i != ans; ++i) printf("%s\n", a[7]);
	} else
	if (x2 == x1) {
		if (y2 > y1)
			for (int i = 0; i != ans; ++i) printf("%s\n", a[5]);
		else
			for (int i = 0; i != ans; ++i) printf("%s\n", a[4]);
	} else {
		if (y2 > y1) {
			for (int i = 0; i != t1; ++i) printf("%s\n", a[2]);
			if (x1-x2 < y2-y1)
				for (int i = 0; i != t2; ++i) printf("%s\n", a[5]);
			else
				for (int i = 0; i != t2; ++i) printf("%s\n", a[6]);
		}
		if (y2 < y1) {
			for (int i = 0; i != t1; ++i) printf("%s\n", a[0]);
			if (x1-x2 < y1-y2)
				for (int i = 0; i != t2; ++i) printf("%s\n", a[4]);
			else
				for (int i = 0; i != t2; ++i) printf("%s\n", a[6]);
		}
		if (y2 == y1)
			for (int i = 0; i != ans; ++i) printf("%s\n", a[6]);
	}
}
